import java.util.ArrayList;
import java.util.Arrays;

public class test3 {
    public static void main(String[] args) {
        ArrayList<Student> arr = new ArrayList<>();
        arr.add(new Student("zhangsan",23));
        arr.add(new Student("lisi",24));
        arr.add(new Student("wangwu",25));
        String[] array = arr.stream().map(Student::append).toArray(String[]::new);
        System.out.println(Arrays.toString(array));
    }
}
